package cn.quicklydoit.mapper;

import cn.quicklydoit.entity.User;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;
import org.springframework.data.repository.query.Param;

public interface UserMapper extends CrudRepository<User,Long> {

    /**
     * 用户登录
     * @param name
     * @param password
     * @return
     */
    @Query(" from User where name=:name and password=:password")
    User login(@Param("name") String name, @Param("password") String password);
}
